perm filename KALAH.AKC[UP,DOC] blob
sn#002765 filedate 1972-10-06 generic text, type T, neo UTF8
00100 K A L A H
00200
00300 THE GAME AND THE PROGRAM
00400
00500
00600 THE GAME
00700 ---------
00800
00900 Kalah is a game played by two persons. The board consists of
01000 12 pits (or holes) 6 on each side. In addition there are two larger
01100 oval shaped holes called kalahs. The pits and kalahs may contain
01200 stones - all stones are alike. The starting board position has 6
01300 stones in each pit and the kalahs are empty (while learning the game
01400 it is better to start with a smaller number of stones e.g. 3 in each
01500 pit). A move consists of picking up all the stones in any pit on your
01600 own side and moving counterclockwise dropping one stone in each pit
01700 or kalah as you go along (you never drop a stone into the opponent's
01800 kalah). A stone, once played into a kalah is never moved out. Two
01900 simple rules help to make the game interesting (and nontrivial). 1.
02000 If the last stone falls into your kalah you play again. 2. If the
02100 last stone falls into an empty pit on your own side you capture all
02200 stones in the opponent's pit opposite your pit and place your stone
02300 and the captured stones into your kalah (you don't get to go again
02400 after a capture, and you can't capture if the opponent's pit is
02500 empty).
02600
02700 PLAYER A
02800
02900 Pits are numbered 1 2 3 4 5 6
03000 ↓ ↓ ↓ ↓ ↓ ↓
03100
03200 / \ / \ / \ / \ / \ / \
03300 \ / \ / \ / \ / \ / \ /
03400
03500 / \ / \
03600
03700 A's | | | | B's
03800 kalah kalah
03900 \ / \ /
04000
04100 / \ / \ / \ / \ / \ / \
04200 \ / \ / \ / \ / \ / \ /
04300
04400 ↑ ↑ ↑ ↑ ↑ ↑
04500 Pits are numbered 6 5 4 3 2 1
04600
04700 PLAYER B
04800
04900
05000 The objective of the game is to get more stones in your kalah
05100 than the opponent can get in his. The game ends if any one gets more
05200 than half the total number of stones into his kalah or if anyone has
05300 no stones left in any of his pits (even if it is his opponent's turn
05400 to move) in which case his opponent gets to keep all outstanding
05500 stones.
05600
05700 An example is given below:
05800
05900 1 2 3 4 5 6
06000 ↓ ↓ ↓ ↓ ↓ ↓
06100 3 3 3 3 3 3
06200 0 0
06300 3 3 3 3 3 3
06400 Move from pit 3 (gets to move again)
06500
06600 1 2 3 4 5 6
06700 ↓ ↓ ↓ ↓ ↓ ↓
06800 4 4 0 3 3 3
06900 1 0
07000 3 3 3 3 3 3
07100 Move from pit 6 (capture, second player's move next)
07200
07300 4 4 0 4 4 0
07400 5 0
07500 3 3 3 3 3 3
07600 ↑ ↑ ↑ ↑ ↑ ↑
07700 6 5 4 3 2 1
07800 Move from pit 1 (nothing spectauclar happens)
07900
08000 1 2 3 4 5 6
08100 ↓ ↓ ↓ ↓ ↓ ↓
08200 4 4 0 4 5 1
08300 5 1
08400 3 3 0 3 3 0
08500 This was a bad move because the first player can now play from pit 4,
08600 then 5 and then capture three stones by playing from pit 6.
08700
08800
08900 HOW TO USE THE PROGRAM
09000 ----------------------
09100
09200 To start the program type R KALAH .
09300
09400 All commands are terminated by a carriage return. In almost
09500 all cases it is sufficient to type the first character of the
09600 command.
09700
09800 Before each game the program asks three questions.
09900 (a) START WITH 1,2,3,3,5 OR 6?
10000 (b) WHAT LEVEL C,B,A, MASTER OR TOURNAMENT?
10100 (c) DO YOU WISH TO START?
10200
10300 The program can play at any of 5 levels. At both C and B
10400 levels it makes its moves almost instantaneously. Level A is the
10500 standard setting (about 3 sec). Master and tournament level settings
10600 take about 6 and 15 sec compute times per move. If you can beat the
10700 tournament level consistently you may apply for a grandmaster ranking
10800 (there is, as yet, no kalah grandmaster).
10900 If the computer's move requires several steps, after each
11000 step the program types
11100 PLEASE TYPE <CR>
11200 asking you to type a carriage return after after examining the move.
11300
11400
11500 OTHER OPTIONS
11600 -------------
11700
11800 When it is your turn to move the computer types
11900 YOUR MOVE PLEASE →→→→→→→→
12000 You may type the pit number to make a move. Options:
12100 (a) BACK - backup
12200 (b) REDO - if you had several submoves, but realized you made
12300 a mistake in one of them, this command will let you
12400 start again
12500 (c) QUIT - terminate the current game
12600 (d) CONCEDE - the program will not mind if you concede the game
12700 (e) DRAW - offer a draw - he will not accept if he is sure he
12800 can win
12900 (f) WIN - claim victory - the computer may not accept
13000 (g) I WIN, DAMMIT - this is the easy way to win
13100 (h) ? - to get help
13200 (i) SHOW - to see the current node.
13300
13400 In all cases except (g) you may type just the first character
13500 of the command.
13600
13700 If you want to save a game you just played type SAVE when at
13800 the end of the game the program asks
13900
14000 ANOTHER GAME?
14100
14200 or, if you forget, at the beginning of the next game when the program
14300 asks
14400
14500 START WITH 1,2,3,4,5 OR 6?
14600
14700 The game will be saved on file KALAH.OUT on your area.
14800
14900
15000 You can start at any special board position you wish. To do
15100 this, type S or SPECIAL when the program asks
15200
15300 START WITH 1,2,3,4,5 OR 6?
15400
15500 The program will then ask you to type the number of stones in
15600 the kalah and pits 1-6 of the first and second players - observe the
15700 numbering of the pits.